<?php global $table_prefix; global $s; require_once('../../../../wp-blog-header.php'); $i=0;
	$max_results = simpax_livesearch_num_results();
?>	
	<?php if (have_posts()) : $n = 0; ?>
	<ul class="live_search">
	<?php while (have_posts()) : the_post(); $n++; ?>
	<?php $i++; if($i%2) { $odd = " class='ls_alt'"; } else { $odd = " class='ls_res'"; } ?>
	<li<?php echo $odd; ?>><a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php _e('Artikelseite von','simpax');?> <?php the_title(); ?>">
	<strong class="ls_title"><?php the_title(); ?></strong><br />
	<?php if (simpax_livesearch_show_date()){
		echo "<span class='ls_date'>";
		the_time('F jS');
		echo " </span>";
		 }
	if (simpax_livesearch_show_comments()){
		echo "<span class='ls_comments'>";
		comments_number('<img src="'.get_bloginfo(stylesheet_directory).'/img/comment.png" alt="'.__('Kommentare','simpax').'" /> 0', '<img src="'.get_bloginfo(stylesheet_directory).'/img/comment.png" alt="'.__('Kommentare','simpax').'" /> 1', '<img src="'.get_bloginfo(stylesheet_directory).'/img/comment.png" alt="'.__('Kommentare','simpax').'" /> %', '', ''); } ?>
		</span>
	</em>
	<?php if (simpax_livesearch_show_desc()){
		echo '<br />';
		echo "<span class='ls_desc'>";
		the_content_rss('', TRUE, '', 20);
		echo "</span>";
		}
	?>
	</a></li>
	<?php if ($n == $max_results) break; ?>
	<?php endwhile; ?>
	<li class="ls_more"><a href="<?php bloginfo('url'); ?>/?s=<?php echo $s; ?>" rel="bookmark" title="<?php _e('Suche nach','simpax'); ?> <?php echo $s; ?>"><?php _e('Weitere Ergebnisse', simpax) ?></a></li>
	<li class="ls_close"><a href="javascript:;" onclick="$('.LSRes').slideUp()"><?php _e('Ausblenden','simpax');?></a></li>
	</div>
	<?php else : ?>
	<li class="ls_nores"><?php _e('Leider keine Ergebnisse :(','simpax'); ?></li>
	<?php endif; ?>
	</ul>